#include <stdio.h>
#include <string.h>

#define BUFFER_SIZE 10

#define ROW  3
#define COLUMN  3


int main()
{
    int array[ROW][COLUMN];//三行四列
    memset(array, 0, sizeof(array));
    int len = sizeof (array);
    printf("len:%d\n", len);

    int value = 1;
    //赋值
    for (int idx = 0; idx < ROW; idx++)
    {
        for (int jdx = 0; jdx < COLUMN; jdx++)
        {
           array[idx][jdx] = value++;
        }
        
    }

      for (int idx = 0; idx < ROW; idx++)
    {
        for (int jdx = 0; jdx < COLUMN; jdx++)
        {
           printf("array[%d][%d] = %d\t", idx, jdx, array[idx][jdx]);
        }
        printf("\n");
    }
        int temp;
        for (int idx = 0; idx < ROW; idx++)
    {
        for (int jdx = idx; jdx < COLUMN; jdx++)
        {
            temp = array[idx][jdx];
            array[idx][jdx] = array[jdx][idx];
            array[jdx][idx] = temp;
        }
        printf("\n");
    }

     for (int idx = 0; idx < ROW; idx++)
    {
        for (int jdx = 0; jdx < COLUMN; jdx++)
        {
           printf("array[%d][%d] = %d\t", idx, jdx, array[idx][jdx]);
        }
        printf("\n");
    }



    



}
